from  django.urls import path


from . import views
from rest_framework.routers import DefaultRouter
from rest_framework.urlpatterns import format_suffix_patterns
router = DefaultRouter()
router.register('users',viewset=views.UserViewSet)
from .Login import LoginView,LogoutView,CaptchaView,UserInfoView

from rest_framework_jwt.views import obtain_jwt_token, refresh_jwt_token, verify_jwt_token

urlpatterns = [



    path('refresh-token/', refresh_jwt_token),  # 刷新JWT token视图
    path('verify-token/', verify_jwt_token),  # 验证JWT token视图
    path('login/', LoginView.as_view()),  # 自定义登录视图
    path('logout/', LogoutView.as_view()),  # 自定义注销视图
    path('captchaImage/', CaptchaView.as_view()),  # 用户列表视图
    path('getInfo/', UserInfoView.as_view()),  # 用户列表视图





]
urlpatterns = format_suffix_patterns(urlpatterns)
urlpatterns += router.urls